// VarTable.h : VarTable is used to keep all the variables that appeared in the program.
// Author: Achyut P Balaji
//
#ifndef VAR_TABLE_H
#define VAR_TABLE_H

#include"../../SPA_Data_Types.h"

using namespace std;

typedef string VAR;
typedef int NOOFCONSTANTS;
typedef NUMERIC_EXPR_TYPE TYPES;

class VarTable {
private:

	vector<VAR> variableList;
	vector<TYPES> variableType;

	NOOFCONSTANTS constantNo;

	static VarTable *obj;
	VarTable();

public:

	static VarTable* getInstance();
	static VarTable* getFirstInstance();

	VAR_INDEX insertVar (VAR v,NUMERIC_EXPR_TYPE type);

	VAR getVarName (VAR_INDEX v);
	STATUS getVarType(VAR_INDEX v,NUMERIC_EXPR_TYPE &type);
	VAR_INDEX getVarIndex (VAR v);

	INTEGER getVarSize();
	INTEGER getTotalSize();

};
#endif